package com.googlecode.wmlynar.gwtbeans.client.beans;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

/**
 * Abstract class implementing SourcesPropertyChangeEvents interface.
 * 
 * @author Wojciech Mlynarczyk (wmlynar@gmail.com)
 * 
 */
public abstract class AbstractBean implements SourcesPropertyChangeEvents {

    protected PropertyChangeSupport support = new PropertyChangeSupport(this);

    public void addPropertyChangeListener(final String propertyName,
            final PropertyChangeListener listener) {
        support.addPropertyChangeListener(propertyName, listener);
    }

    public void removePropertyChangeListener(final String propertyName,
            final PropertyChangeListener listener) {
        support.removePropertyChangeListener(propertyName, listener);
    }
}
